home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Utilities / Unix / cvs-960311 / info / cvs.info-1 next >
Encoding:
GNU Info File  |  1996-01-24  |  48.9 KB  |  1,279 lines

  1. This is Info file cvs.info, produced by Makeinfo-1.64 from the input
  2. file ./cvs.texinfo.
  3.  
  4.    Copyright (C) 1992, 1993 Signum Support AB Copyright (C) 1993, 1994
  5. Free Software Foundation, Inc.
  6.  
  7.    Permission is granted to make and distribute verbatim copies of this
  8. manual provided the copyright notice and this permission notice are
  9. preserved on all copies.
  10.  
  11.    Permission is granted to copy and distribute modified versions of
  12. this manual under the conditions for verbatim copying, provided also
  13. that the section entitled "GNU General Public License" is included
  14. exactly as in the original, and provided that the entire resulting
  15. derived work is distributed under the terms of a permission notice
  16. identical to this one.
  17.  
  18.    Permission is granted to copy and distribute translations of this
  19. manual into another language, under the above conditions for modified
  20. versions, except that the section entitled "GNU General Public License"
  21. and this permission notice may be included in translations approved by
  22. the Free Software Foundation instead of in the original English.
  23.  
  24. 
  25. File: cvs.info,  Node: Top,  Next: Preface,  Up: (dir)
  26.  
  27.  
  28.  
  29.    This info manual describes how to use and administer CVS and is
  30. updated to release 1.4 or something similar.
  31.  
  32. * Menu:
  33.  
  34. * Preface::                     About this manual
  35. * What is CVS?::                What is CVS?
  36. * Basic concepts::              Basic concepts of revision management
  37. * A sample session::            A tour of basic CVS usage
  38. * Repository::                  Where all your sources are stored
  39. * Starting a new project::      Starting a project with CVS
  40. * Multiple developers::         How CVS helps a group of developers
  41. * Branches::                    Parallel development explained
  42. * Merging::                     How to move changes between branches
  43. * Recursive behavior::          CVS descends directories
  44. * Adding files::                Adding files to a module
  45. * Removing files::              Removing files from a module
  46. * Tracking sources::            Tracking third-party sources
  47. * Moving files::                Moving and renaming files
  48. * Moving directories::          Moving and renaming directories
  49. * Keyword substitution::        CVS can include the revision inside the file
  50. * Binary files::                CVS can handle binary files
  51. * Revision management::         Policy questions for revision management
  52. * Invoking CVS::                Reference manual for CVS commands
  53. * Administrative files::        Reference manual for the Administrative files
  54. * Environment variables::       All environment variables which affect CVS
  55. * Troubleshooting::             Some tips when nothing works
  56. * Copying::                     GNU GENERAL PUBLIC LICENSE
  57. * Index::                       Index
  58.  
  59. 
  60. File: cvs.info,  Node: Preface,  Next: What is CVS?,  Prev: Top,  Up: Top
  61.  
  62. About this manual
  63. *****************
  64.  
  65.    Up to this point, one of the weakest parts of CVS has been the
  66. documentation.  CVS is a complex program.  Previous versions of the
  67. manual were written in the manual page format, which is not really well
  68. suited for such a complex program.
  69.  
  70.    When writing this manual, I had several goals in mind:
  71.  
  72.    * No knowledge of RCS should be necessary.
  73.  
  74.    * No previous knowledge of revision control software should be
  75.      necessary.  All terms, such as "revision numbers", "revision
  76.      trees" and "merging" are explained as they are introduced.
  77.  
  78.    * The manual should concentrate on the things CVS users want to do,
  79.      instead of what the CVS commands can do.  The first part of this
  80.      manual leads you through things you might want to do while doing
  81.      development, and introduces the relevant CVS commands as they are
  82.      needed.
  83.  
  84.    * Information should be easy to find.  In the reference manual in
  85.      the appendices almost all information about every CVS command is
  86.      gathered together.  There is also an extensive index, and a lot of
  87.      cross references.
  88.  
  89.    This manual was contributed by Signum Support AB in Sweden.  Signum
  90. is yet another in the growing list of companies that support free
  91. software.  You are free to copy both this manual and the CVS program.
  92. *Note Copying::, for the details.  Signum Support offers support
  93. contracts and binary distribution for many programs, such as CVS, GNU
  94. Emacs, the GNU C compiler and others.  Write to us for more information.
  95.  
  96.      Signum Support AB
  97.      Box 2044
  98.      S-580 02  Linkoping
  99.      Sweden
  100.      
  101.      Email: info@signum.se
  102.      Phone: +46 (0)13 - 21 46 00
  103.      Fax:   +46 (0)13 - 21 47 00
  104.  
  105.    Another company selling support for CVS is Cyclic Software, web:
  106. `http://www.cyclic.com/', email: `info@cyclic.com'.
  107.  
  108. * Menu:
  109.  
  110. * Checklist::
  111. * Credits::
  112. * BUGS::
  113.  
  114. 
  115. File: cvs.info,  Node: Checklist,  Next: Credits,  Up: Preface
  116.  
  117. Checklist for the impatient reader
  118. ==================================
  119.  
  120.    CVS is a complex system.  You will need to read the manual to be
  121. able to use all of its capabilities.  There are dangers that can easily
  122. be avoided if you know about them, and this manual tries to warn you
  123. about them.  This checklist is intended to help you avoid the dangers
  124. without reading the entire manual.  If you intend to read the entire
  125. manual you can skip this table.
  126.  
  127. Binary files
  128.      CVS can handle binary files, but you must have RCS release 5.5 or
  129.      later and a release of GNU diff that supports the `-a' flag
  130.      (release 1.15 and later are OK).  You must also configure both RCS
  131.      and CVS to handle binary files when you install them.
  132.  
  133.      Keword substitution can be a source of trouble with binary files.
  134.      *Note Keyword substitution::, for solutions.
  135.  
  136. The `admin' command
  137.      Uncareful use of the `admin' command can cause CVS to cease
  138.      working.  *Note admin::, before trying to use it.
  139.  
  140. 
  141. File: cvs.info,  Node: Credits,  Next: BUGS,  Prev: Checklist,  Up: Preface
  142.  
  143. Credits
  144. =======
  145.  
  146.    Roland Pesch, Cygnus Support <pesch@cygnus.com> wrote the manual
  147. pages which were distributed with CVS 1.3.  Appendix A and B contain
  148. much text that was extracted from them.  He also read an early draft of
  149. this manual and contributed many ideas and corrections.
  150.  
  151.    The mailing-list `info-cvs' is sometimes informative. I have
  152. included information from postings made by the following persons: David
  153. G. Grubbs <dgg@think.com>.
  154.  
  155.    Some text has been extracted from the man pages for RCS.
  156.  
  157.    The CVS FAQ (*note What is CVS?::.) by David G. Grubbs has been used
  158. as a check-list to make sure that this manual is as complete as
  159. possible.  (This manual does however not include all of the material in
  160. the FAQ).  The FAQ contains a lot of useful information.
  161.  
  162.    In addition, the following persons have helped by telling me about
  163. mistakes I've made: Roxanne Brunskill <rbrunski@datap.ca>, Kathy Dyer
  164. <dyer@phoenix.ocf.llnl.gov>, Karl Pingle <pingle@acuson.com>, Thomas A
  165. Peterson <tap@src.honeywell.com>, Inge Wallin <ingwa@signum.se>, Dirk
  166. Koschuetzki <koschuet@fmi.uni-passau.de> and Michael Brown
  167. <brown@wi.extrel.com>.
  168.  
  169. 
  170. File: cvs.info,  Node: BUGS,  Prev: Credits,  Up: Preface
  171.  
  172. BUGS
  173. ====
  174.  
  175.    This manual is known to have room for improvement.  Here is a list
  176. of known deficiencies:
  177.  
  178.    * In the examples, the output from CVS is sometimes displayed,
  179.      sometimes not.
  180.  
  181.    * The input that you are supposed to type in the examples should
  182.      have a different font than the output from the computer.
  183.  
  184.    * This manual should be clearer about what file permissions you
  185.      should set up in the repository, and about setuid/setgid.
  186.  
  187.    * Some of the chapters are not yet complete.  They are noted by
  188.      comments in the `cvs.texinfo' file.
  189.  
  190.    * This list is not complete.  If you notice any error, omission, or
  191.      something that is unclear, please send mail to
  192.      bug-cvs@prep.ai.mit.edu.
  193.  
  194.    I hope that you will find this manual useful, despite the
  195. above-mentioned shortcomings.
  196.  
  197.  
  198.                                                 Linkoping, October 1993
  199.                                                          Per Cederqvist
  200.  
  201. 
  202. File: cvs.info,  Node: What is CVS?,  Next: Basic concepts,  Prev: Preface,  Up: Top
  203.  
  204. What is CVS?
  205. ************
  206.  
  207.    CVS is a version control system.  Using it, you can record the
  208. history of your source files.
  209.  
  210.    For example, bugs sometimes creep in when software is modified, and
  211. you might not detect the bug until a long time after you make the
  212. modification.  With CVS, you can easily retrieve old versions to see
  213. exactly which change caused the bug.  This can sometimes be a big help.
  214.  
  215.    You could of course save every version of every file you have ever
  216. created.  This would however waste an enormous amount of disk space.
  217. CVS stores all the versions of a file in a single file in a clever way
  218. that only stores the differences between versions.
  219.  
  220.    CVS also helps you if you are part of a group of people working on
  221. the same project.  It is all too easy to overwrite each others' changes
  222. unless you are extremely careful.  Some editors, like GNU Emacs, try to
  223. make sure that the same file is never modified by two people at the
  224. same time.  Unfortunately, if someone is using another editor, that
  225. safeguard will not work.  CVS solves this problem by insulating the
  226. different developers from each other.  Every developer works in his own
  227. directory, and CVS merges the work when each developer is done.
  228.  
  229.    CVS started out as a bunch of shell scripts written by Dick Grune,
  230. posted to `comp.sources.unix' in the volume 6 release of December,
  231. 1986.  While no actual code from these shell scripts is present in the
  232. current version of CVS much of the CVS conflict resolution algorithms
  233. come from them.
  234.  
  235.    In April, 1989, Brian Berliner designed and coded CVS.  Jeff Polk
  236. later helped Brian with the design of the CVS module and vendor branch
  237. support.
  238.  
  239.    You can get CVS via anonymous ftp from a number of sites, for
  240. instance prep.ai.mit.edu in `pub/gnu'.
  241.  
  242.    There is a mailing list for CVS where bug reports can be sent,
  243. questions can be asked, an FAQ is posted, and discussion about future
  244. enhancements to CVS take place.  To submit a message to the list, write
  245. to <info-cvs@prep.ai.mit.edu>.  To subscribe or unsubscribe, write to
  246. <info-cvs-request@prep.ai.mit.edu>. Please be specific about your email
  247. address.
  248.  
  249.    Work is in progress on creating a newsgroup for CVS-related topics.
  250. It will appear somewhere under the `gnu.' hierarchy.  Gateways to and
  251. from the mailing list will be set up.
  252.  
  253.    The FTP site think.com has some CVS material in the `/pub/cvs'
  254. subdirectory.  Currently (late summer 1993) it contains an excellent
  255. FAQ (Frequently Asked Questions, with answers), and an improved (but
  256. unofficial) version of CVS.
  257.  
  258. CVS is not...
  259. =============
  260.  
  261.    CVS can do a lot of things for you, but it does not try to be
  262. everything for everyone.
  263.  
  264. CVS is not a build system.
  265.      Though the structure of your repository and modules file interact
  266.      with your build system (e.g. `Makefile's), they are essentially
  267.      independent.
  268.  
  269.      CVS does not dictate how you build anything.  It merely stores
  270.      files for retrieval in a tree structure you devise.
  271.  
  272.      CVS does not dictate how to use disk space in the checked out
  273.      working directories.  If you write your `Makefile's or scripts in
  274.      every directory so they have to know the relative positions of
  275.      everything else, you wind up requiring the entire repository to be
  276.      checked out.  That's simply bad planning.
  277.  
  278.      If you modularize your work, and construct a build system that
  279.      will share files (via links, mounts, `VPATH' in `Makefile's,
  280.      etc.), you can arrange your disk usage however you like.
  281.  
  282.      But you have to remember that *any* such system is a lot of work
  283.      to construct and maintain.  CVS does not address the issues
  284.      involved.  You must use your brain and a collection of other tools
  285.      to provide a build scheme to match your plans.
  286.  
  287.      Of course, you should place the tools created to support such a
  288.      build system (scripts, `Makefile's, etc) under CVS.
  289.  
  290. CVS is not a substitute for management.
  291.      Your managers and project leaders are expected to talk to you
  292.      frequently enough to make certain you are aware of schedules,
  293.      merge points, branch names and release dates.  If they don't, CVS
  294.      can't help.
  295.  
  296.      CVS is an instrument for making sources dance to your tune.  But
  297.      you are the piper and the composer.  No instrument plays itself or
  298.      writes its own music.
  299.  
  300. CVS is not a substitute for developer communication.
  301.      When faced with conflicts within a single file, most developers
  302.      manage to resolve them without too much effort.  But a more
  303.      general definition of "conflict" includes problems too difficult
  304.      to solve without communication between developers.
  305.  
  306.      CVS cannot determine when simultaneous changes within a single
  307.      file, or across a whole collection of files, will logically
  308.      conflict with one another.  Its concept of a "conflict" is purely
  309.      textual, arising when two changes to the same base file are near
  310.      enough to spook the merge (i.e. `diff3') command.
  311.  
  312.      CVS does not claim to help at all in figuring out non-textual or
  313.      distributed conflicts in program logic.
  314.  
  315.      For example: Say you change the arguments to function `X' defined
  316.      in file `A'.  At the same time, someone edits file `B', adding new
  317.      calls to function `X' using the old arguments.  You are outside
  318.      the realm of CVS's competence.
  319.  
  320.      Acquire the habit of reading specs and talking to your peers.
  321.  
  322. CVS is not a configuration management system.
  323.      CVS is a source control system.  The phrase "configuration
  324.      management" is a marketing term, not an industry-recognized set of
  325.      functions.
  326.  
  327.      A true "configuration management system" would contain elements of
  328.      the following:
  329.  
  330.         * Source control.
  331.  
  332.         * Dependency tracking.
  333.  
  334.         * Build systems (i.e. What to build and how to find things
  335.           during a build.  What is shared?  What is local?)
  336.  
  337.         * Bug tracking.
  338.  
  339.         * Automated Testing procedures.
  340.  
  341.         * Release Engineering documentation and procedures.
  342.  
  343.         * Tape Construction.
  344.  
  345.         * Customer Installation.
  346.  
  347.         * A way for users to run different versions of the same
  348.           software on the same host at the same time.
  349.  
  350.      CVS provides only the first.
  351.  
  352.    This section is taken from release 2.3 of the CVS FAQ.
  353.  
  354. 
  355. File: cvs.info,  Node: Basic concepts,  Next: A sample session,  Prev: What is CVS?,  Up: Top
  356.  
  357. Basic concepts
  358. **************
  359.  
  360.    CVS stores all files in a centralized "repository": a directory
  361. (such as `/usr/local/cvsroot' or `user@remotehost:/usr/local/cvsroot')
  362. which is populated with a hierarchy of files and directories.  (*note
  363. Remote repositories::. for information about keeping the repository on
  364. a remote machine.)
  365.  
  366.    Normally, you never access any of the files in the repository
  367. directly.  Instead, you use CVS commands to get your own copy of the
  368. files, and then work on that copy.  When you've finished a set of
  369. changes, you check (or "commit") them back into the repository.
  370.  
  371.    The files in the repository are organized in "modules".  Each module
  372. is made up of one or more files, and can include files from several
  373. directories.  A typical usage is to define one module per project.
  374.  
  375. * Menu:
  376.  
  377. * Revision numbers::            The meaning of a revision number
  378. * Versions revisions releases::  Terminology used in this manual
  379.  
  380. 
  381. File: cvs.info,  Node: Revision numbers,  Next: Versions revisions releases,  Up: Basic concepts
  382.  
  383. Revision numbers
  384. ================
  385.  
  386.    Each version of a file has a unique "revision number".  Revision
  387. numbers look like `1.1', `1.2', `1.3.2.2' or even `1.3.2.2.4.5'.  A
  388. revision number always has an even number of period-separated decimal
  389. integers.  By default revision 1.1 is the first revision of a file.
  390. Each successive revision is given a new number by increasing the
  391. rightmost number by one.  The following figure displays a few
  392. revisions, with newer revisions to the right.
  393.  
  394.             +-----+    +-----+    +-----+    +-----+    +-----+
  395.             ! 1.1 !----! 1.2 !----! 1.3 !----! 1.4 !----! 1.5 !
  396.             +-----+    +-----+    +-----+    +-----+    +-----+
  397.  
  398.    CVS is not limited to linear development.  The "revision tree" can
  399. be split into "branches", where each branch is a self-maintained line of
  400. development.  Changes made on one branch can easily be moved back to
  401. the main trunk.
  402.  
  403.    Each branch has a "branch number", consisting of an odd number of
  404. period-separated decimal integers.  The branch number is created by
  405. appending an integer to the revision number where the corresponding
  406. branch forked off.  Having branch numbers allows more than one branch
  407. to be forked off from a certain revision.
  408.  
  409.    All revisions on a branch have revision numbers formed by appending
  410. an ordinal number to the branch number.  The following figure
  411. illustrates branching with an example.
  412.  
  413.                                                           +-------------+
  414.                                Branch 1.2.2.3.2 ->        ! 1.2.2.3.2.1 !
  415.                                                         / +-------------+
  416.                                                        /
  417.                                                       /
  418.                       +---------+    +---------+    +---------+    +---------+
  419.      Branch 1.2.2 -> _! 1.2.2.1 !----! 1.2.2.2 !----! 1.2.2.3 !----! 1.2.2.4 !
  420.                     / +---------+    +---------+    +---------+    +---------+
  421.                    /
  422.                   /
  423.      +-----+    +-----+    +-----+    +-----+    +-----+
  424.      ! 1.1 !----! 1.2 !----! 1.3 !----! 1.4 !----! 1.5 !      <- The main trunk
  425.      +-----+    +-----+    +-----+    +-----+    +-----+
  426.                      !
  427.                      !
  428.                      !   +---------+    +---------+    +---------+
  429.      Branch 1.2.4 -> +---! 1.2.4.1 !----! 1.2.4.2 !----! 1.2.4.3 !
  430.                          +---------+    +---------+    +---------+
  431.  
  432.    The exact details of how the branch number is constructed is not
  433. something you normally need to be concerned about, but here is how it
  434. works: When CVS creates a branch number it picks the first unused even
  435. integer, starting with 2.  So when you want to create a branch from
  436. revision 6.4 it will be numbered 6.4.2.  All branch numbers ending in a
  437. zero (such as 6.4.0) are used internally by CVS (*note Magic branch
  438. numbers::.).  The branch 1.1.1 has a special meaning.  *Note Tracking
  439. sources::.
  440.  
  441. 
  442. File: cvs.info,  Node: Versions revisions releases,  Prev: Revision numbers,  Up: Basic concepts
  443.  
  444. Versions, revisions and releases
  445. ================================
  446.  
  447.    A file can have several versions, as described above.  Likewise, a
  448. software product can have several versions.  A software product is
  449. often given a version number such as `4.1.1'.
  450.  
  451.    Versions in the first sense are called "revisions" in this document,
  452. and versions in the second sense are called "releases".  To avoid
  453. confusion, the word "version" is almost never used in this document.
  454.  
  455. 
  456. File: cvs.info,  Node: A sample session,  Next: Repository,  Prev: Basic concepts,  Up: Top
  457.  
  458. A sample session
  459. ****************
  460.  
  461.    This section describes a typical work-session using CVS.  It assumes
  462. that a repository is set up (*note Repository::.).
  463.  
  464.    Suppose you are working on a simple compiler.  The source consists
  465. of a handful of C files and a `Makefile'.  The compiler is called `tc'
  466. (Trivial Compiler), and the repository is set up so that there is a
  467. module called `tc'.
  468.  
  469. * Menu:
  470.  
  471. * Getting the source::          Creating a workspace
  472. * Committing your changes::     Making your work available to others
  473. * Cleaning up::                 Cleaning up
  474. * Viewing differences::         Viewing differences
  475.  
  476. 
  477. File: cvs.info,  Node: Getting the source,  Next: Committing your changes,  Up: A sample session
  478.  
  479. Getting the source
  480. ==================
  481.  
  482.    The first thing you must do is to get your own working copy of the
  483. source for `tc'.  For this, you use the `checkout' command:
  484.  
  485.      $ cvs checkout tc
  486.  
  487. This will create a new directory called `tc' and populate it with the
  488. source files.
  489.  
  490.      $ cd tc
  491.      $ ls tc
  492.      CVS         Makefile    backend.c   driver.c    frontend.c  parser.c
  493.  
  494.    The `CVS' directory is used internally by CVS.  Normally, you should
  495. not modify or remove any of the files in it.
  496.  
  497.    You start your favorite editor, hack away at `backend.c', and a
  498. couple of hours later you have added an optimization pass to the
  499. compiler.  A note to RCS and SCCS users: There is no need to lock the
  500. files that you want to edit.  *Note Multiple developers:: for an
  501. explanation.
  502.  
  503. 
  504. File: cvs.info,  Node: Committing your changes,  Next: Cleaning up,  Prev: Getting the source,  Up: A sample session
  505.  
  506. Committing your changes
  507. =======================
  508.  
  509.    When you have checked that the compiler is still compilable you
  510. decide to make a new version of `backend.c'.
  511.  
  512.      $ cvs commit backend.c
  513.  
  514. CVS starts an editor, to allow you to enter a log message.  You type in
  515. "Added an optimization pass.", save the temporary file, and exit the
  516. editor.
  517.  
  518.    The environment variable `$CVSEDITOR' determines which editor is
  519. started.  If `$CVSEDITOR' is not set, then if the environment variable
  520. `$EDITOR' is set, it will be used. If both `$CVSEDITOR' and `$EDITOR'
  521. are not set then the editor defaults to `vi'.  If you want to avoid the
  522. overhead of starting an editor you can specify the log message on the
  523. command line using the `-m' flag instead, like this:
  524.  
  525.      $ cvs commit -m "Added an optimization pass" backend.c
  526.  
  527. 
  528. File: cvs.info,  Node: Cleaning up,  Next: Viewing differences,  Prev: Committing your changes,  Up: A sample session
  529.  
  530. Cleaning up
  531. ===========
  532.  
  533.    Before you turn to other tasks you decide to remove your working
  534. copy of tc.  One acceptable way to do that is of course
  535.  
  536.      $ cd ..
  537.      $ rm -r tc
  538.  
  539. but a better way is to use the `release' command (*note release::.):
  540.  
  541.      $ cd ..
  542.      $ cvs release -d tc
  543.      M driver.c
  544.      ? tc
  545.      You have [1] altered files in this repository.
  546.      Are you sure you want to release (and delete) module `tc': n
  547.      ** `release' aborted by user choice.
  548.  
  549.    The `release' command checks that all your modifications have been
  550. committed.  If history logging is enabled it also makes a note in the
  551. history file.  *Note history file::.
  552.  
  553.    When you use the `-d' flag with `release', it also removes your
  554. working copy.
  555.  
  556.    In the example above, the `release' command wrote a couple of lines
  557. of output.  `? tc' means that the file `tc' is unknown to CVS.  That is
  558. nothing to worry about: `tc' is the executable compiler, and it should
  559. not be stored in the repository.  *Note cvsignore::, for information
  560. about how to make that warning go away.  *Note release output::, for a
  561. complete explanation of all possible output from `release'.
  562.  
  563.    `M driver.c' is more serious.  It means that the file `driver.c' has
  564. been modified since it was checked out.
  565.  
  566.    The `release' command always finishes by telling you how many
  567. modified files you have in your working copy of the sources, and then
  568. asks you for confirmation before deleting any files or making any note
  569. in the history file.
  570.  
  571.    You decide to play it safe and answer `n RET' when `release' asks
  572. for confirmation.
  573.  
  574. 
  575. File: cvs.info,  Node: Viewing differences,  Prev: Cleaning up,  Up: A sample session
  576.  
  577. Viewing differences
  578. ===================
  579.  
  580.    You do not remember modifying `driver.c', so you want to see what
  581. has happened to that file.
  582.  
  583.      $ cd tc
  584.      $ cvs diff driver.c
  585.  
  586.    This command runs `diff' to compare the version of `driver.c' that
  587. you checked out with your working copy.  When you see the output you
  588. remember that you added a command line option that enabled the
  589. optimization pass.  You check it in, and release the module.
  590.  
  591.      $ cvs commit -m "Added an optimization pass" driver.c
  592.      Checking in driver.c;
  593.      /usr/local/cvsroot/tc/driver.c,v  <--  driver.c
  594.      new revision: 1.2; previous revision: 1.1
  595.      done
  596.      $ cd ..
  597.      $ cvs release -d tc
  598.      ? tc
  599.      You have [0] altered files in this repository.
  600.      Are you sure you want to release (and delete) module `tc': y
  601.  
  602. 
  603. File: cvs.info,  Node: Repository,  Next: Starting a new project,  Prev: A sample session,  Up: Top
  604.  
  605. The Repository
  606. **************
  607.  
  608.    Figure 3 below shows a typical setup of a repository.  Only
  609. directories are shown below.
  610.  
  611.      /usr
  612.       |
  613.       +--local
  614.       |   |
  615.       |   +--cvsroot
  616.       |   |    |
  617.       |   |    +--CVSROOT
  618.                |      (administrative files)
  619.                |
  620.                +--gnu
  621.                |   |
  622.                |   +--diff
  623.                |   |   (source code to GNU diff)
  624.                |   |
  625.                |   +--rcs
  626.                |   |   (source code to RCS)
  627.                |   |
  628.                |   +--cvs
  629.                |       (source code to CVS)
  630.                |
  631.                +--yoyodyne
  632.                    |
  633.                    +--tc
  634.                    |    |
  635.                    |    +--man
  636.                    |    |
  637.                    |    +--testing
  638.                    |
  639.                    +--(other Yoyodyne software)
  640.  
  641.    There are a couple of different ways to tell CVS where to find the
  642. repository.  You can name the repository on the command line
  643. explicitly, with the `-d' (for "directory") option:
  644.  
  645.      cvs -d /usr/local/cvsroot checkout yoyodyne/tc
  646.  
  647.    Or you can set the `$CVSROOT' environment variable to an absolute
  648. path to the root of the repository, `/usr/local/cvsroot' in this
  649. example.  To set `$CVSROOT', all `csh' and `tcsh' users should have
  650. this line in their `.cshrc' or `.tcshrc' files:
  651.  
  652.      setenv CVSROOT /usr/local/cvsroot
  653.  
  654. `sh' and `bash' users should instead have these lines in their
  655. `.profile' or `.bashrc':
  656.  
  657.      CVSROOT=/usr/local/cvsroot
  658.      export CVSROOT
  659.  
  660.    A repository specified with `-d' will override the `$CVSROOT'
  661. environment variable.  Once you've checked a working copy out from the
  662. repository, it will remember where its repository is (the information
  663. is recorded in the `CVS/Root' file in the working copy).
  664.  
  665.    The `-d' option and the `CVS/Root' file both override the `$CVSROOT'
  666. environment variable; however, CVS will complain if the `-d' argument
  667. and the `CVS/Root' file disagree.
  668.  
  669.    There is nothing magical about the name `/usr/local/cvsroot'.  You
  670. can choose to place the repository anywhere you like.  *Note Remote
  671. repositories:: to learn how the repository can be on a different
  672. machine than your working copy of the sources.
  673.  
  674.    The repository is split in two parts.  `$CVSROOT/CVSROOT' contains
  675. administrative files for CVS.  The other directories contain the actual
  676. user-defined modules.
  677.  
  678. * Menu:
  679.  
  680. * User modules::                The structure of the repository
  681. * Intro administrative files::  Defining modules
  682. * Multiple repositories::       Multiple repositories
  683. * Creating a repository::       Creating a repository
  684. * Remote repositories::         Accessing repositories on remote machines
  685.  
  686. 
  687. File: cvs.info,  Node: User modules,  Next: Intro administrative files,  Up: Repository
  688.  
  689. User modules
  690. ============
  691.  
  692.        `$CVSROOT'
  693.          |
  694.          +--yoyodyne
  695.          |   |
  696.          |   +--tc
  697.          |   |   |
  698.                  +--Makefile,v
  699.                  +--backend.c,v
  700.                  +--driver.c,v
  701.                  +--frontend.c,v
  702.                  +--parser.c,v
  703.                  +--man
  704.                  |    |
  705.                  |    +--tc.1,v
  706.                  |
  707.                  +--testing
  708.                       |
  709.                       +--testpgm.t,v
  710.                       +--test2.t,v
  711.  
  712.    The figure above shows the contents of the `tc' module inside the
  713. repository.  As you can see all file names end in `,v'.  The files are
  714. "history files".  They contain, among other things, enough information
  715. to recreate any revision of the file, a log of all commit messages and
  716. the user-name of the person who committed the revision.  CVS uses the
  717. facilities of RCS, a simpler version control system, to maintain these
  718. files.  For a full description of the file format, see the `man' page
  719. `rcsfile(5)'.
  720.  
  721. * Menu:
  722.  
  723. * File permissions::            File permissions
  724.  
  725. 
  726. File: cvs.info,  Node: File permissions,  Up: User modules
  727.  
  728. File permissions
  729. ----------------
  730.  
  731.    All `,v' files are created read-only, and you should not change the
  732. permission of those files.  The directories inside the repository
  733. should be writable by the persons that have permission to modify the
  734. files in each directory.  This normally means that you must create a
  735. UNIX group (see group(5)) consisting of the persons that are to edit
  736. the files in a project, and set up the repository so that it is that
  737. group that owns the directory.
  738.  
  739.    This means that you can only control access to files on a
  740. per-directory basis.
  741.  
  742.    CVS tries to set up reasonable file permissions for new directories
  743. that are added inside the tree, but you must fix the permissions
  744. manually when a new directory should have different permissions than its
  745. parent directory.
  746.  
  747.    Since CVS was not written to be run setuid, it is unsafe to try to
  748. run it setuid.  You cannot use the setuid features of RCS together with
  749. CVS.
  750.  
  751. 
  752. File: cvs.info,  Node: Intro administrative files,  Next: Multiple repositories,  Prev: User modules,  Up: Repository
  753.  
  754. The administrative files
  755. ========================
  756.  
  757.    The directory `$CVSROOT/CVSROOT' contains some "administrative
  758. files".  *Note Administrative files::, for a complete description.  You
  759. can use CVS without any of these files, but some commands work better
  760. when at least the `modules' file is properly set up.
  761.  
  762.    The most important of these files is the `modules' file.  It defines
  763. all modules in the repository.  This is a sample `modules' file.
  764.  
  765.      CVSROOT         -i mkmodules CVSROOT
  766.      modules         -i mkmodules CVSROOT modules
  767.      cvs             gnu/cvs
  768.      rcs             gnu/rcs
  769.      diff            gnu/diff
  770.      tc              yoyodyne/tc
  771.  
  772.    The `modules' file is line oriented.  In its simplest form each line
  773. contains the name of the module, whitespace, and the directory where
  774. the module resides.  The directory is a path relative to `$CVSROOT'.
  775. The last for lines in the example above are examples of such lines.
  776.  
  777.    Each module definition can contain options.  The `-i mkmodules' is
  778. an example of an option.  It arranges for CVS to run the `mkmodules'
  779. program whenever any file in the module CVSROOT is committed.  That
  780. program is responsible for checking out read-only copies from the RCS
  781. "history files" of all the administrative files.  These read-only
  782. copies are used internally by CVS.  You should never edit them directly.
  783.  
  784.    The line that defines the module called `modules' uses features that
  785. are not explained here.  *Note modules::, for a full explanation of all
  786. the available features.
  787.  
  788. Editing administrative files
  789. ----------------------------
  790.  
  791.    You edit the administrative files in the same way that you would edit
  792. any other module.  Use `cvs checkout CVSROOT' to get a working copy,
  793. edit it, and commit your changes in the normal way.
  794.  
  795.    It is possible to commit an erroneous administrative file.  You can
  796. often fix the error and check in a new revision, but sometimes a
  797. particularly bad error in the administrative file makes it impossible
  798. to commit new revisions.
  799.  
  800. 
  801. File: cvs.info,  Node: Multiple repositories,  Next: Creating a repository,  Prev: Intro administrative files,  Up: Repository
  802.  
  803. Multiple repositories
  804. =====================
  805.  
  806.    In some situations it is a good idea to have more than one
  807. repository, for instance if you have two development groups that work
  808. on separate projects without sharing any code.  All you have to do to
  809. have several repositories is to specify the appropriate repository,
  810. using the `CVSROOT' environment variable, the `-d' option to CVS, or
  811. (once you have checked out a working directories) by simply allowing
  812. CVS to use the repository that was used to check out the working
  813. directory (*note Repository::.).
  814.  
  815.    Notwithstanding, it can be confusing to have two or more
  816. repositories.
  817.  
  818.    None of the examples in this manual show multiple repositories.
  819.  
  820. 
  821. File: cvs.info,  Node: Creating a repository,  Next: Remote repositories,  Prev: Multiple repositories,  Up: Repository
  822.  
  823. Creating a repository
  824. =====================
  825.  
  826.    See the instructions in the `INSTALL' file in the CVS distribution.
  827.  
  828. 
  829. File: cvs.info,  Node: Remote repositories,  Prev: Creating a repository,  Up: Repository
  830.  
  831. Remote repositories
  832. ===================
  833.  
  834.    Your working copy of the sources can be on a different machine than
  835. the repository.  Generally, using a remote repository is just like
  836. using a local one, except that the format of the repository name is:
  837.  
  838.              user@hostname:/path/to/repository
  839.  
  840.    The details of exactly what needs to be set up depend on how you are
  841. connecting to the server.
  842.  
  843. * Menu:
  844.  
  845. * Connecting via rsh::          Using the `rsh' program to connect
  846. * Password authenticated::      Direct connections using passwords
  847. * Kerberos authenticated::      Direct connections with kerberos
  848.  
  849. 
  850. File: cvs.info,  Node: Connecting via rsh,  Next: Password authenticated,  Up: Remote repositories
  851.  
  852. Connecting with rsh
  853. -------------------
  854.  
  855.    CVS uses the `rsh' protocol to perform these operations, so the
  856. remote user host needs to have a `.rhosts' file which grants access to
  857. the local user.
  858.  
  859.    For example, suppose you are the user `mozart' on the local machine
  860. `anklet.grunge.com', and the server machine is
  861. `chainsaw.brickyard.com'.  On chainsaw, put the following line into the
  862. file `.rhosts' in `bach''s home directory:
  863.  
  864.      anklet.grunge.com  mozart
  865.  
  866.    Then test that `rsh' is working with
  867.  
  868.      rsh -l bach chainsaw.brickyard.com echo $PATH
  869.  
  870.    Next you have to make sure that `rsh' will be able to find the
  871. server.  Make sure that the path which `rsh' printed in the above
  872. example includes the directory containing a program named `cvs' which
  873. is the server.  You need to set the path in `.bashrc', `.cshrc', etc.,
  874. not `.login' or `.profile'.  Alternately, you can set the environment
  875. variable `CVS_SERVER' on the client machine to the filename of the
  876. server you want to use, for example `/usr/local/bin/cvs-1.6'.
  877.  
  878.    There is no need to edit `inetd.conf' or start a CVS server daemon.
  879.  
  880.    Continuing our example, supposing you want to access the module
  881. `foo' in the repository `/usr/local/cvsroot/', on machine
  882. `chainsaw.brickyard.com', you are ready to go:
  883.  
  884.      cvs -d bach@chainsaw.brickyard.com:/user/local/cvsroot checkout foo
  885.  
  886.    (The `bach@' can be omitted if the username is the same on both the
  887. local and remote hosts.)
  888.  
  889. 
  890. File: cvs.info,  Node: Password authenticated,  Next: Kerberos authenticated,  Prev: Connecting via rsh,  Up: Remote repositories
  891.  
  892. Direct connection with password authentication
  893. ----------------------------------------------
  894.  
  895.    The CVS client can also connect to the server using a password
  896. protocol.  This is particularly useful if using `rsh' is not feasible
  897. (for example, the server is behind a firewall), and Kerberos also is
  898. not available.
  899.  
  900.    To use this method, it is necessary to make some adjustments on both
  901. the server and client sides.
  902.  
  903. * Menu:
  904.  
  905. * Password authentication server::     Setting up the server
  906. * Password authentication client::     Using the client
  907. * Password authentication security::   What this method does and does not do
  908.  
  909. 
  910. File: cvs.info,  Node: Password authentication server,  Next: Password authentication client,  Up: Password authenticated
  911.  
  912. Setting up the server for password authentication
  913. .................................................
  914.  
  915.    On the server side, the file `/etc/inetd.conf' needs to be edited so
  916. `inetd' knows to run the command `cvs pserver' when it receives a
  917. connection on the right port.  By default, the port number is 2401; it
  918. would be different if your client were compiled with `CVS_AUTH_PORT'
  919. defined to something else, though.
  920.  
  921.    If your `inetd' allows raw port numbers in `/etc/inetd.conf', then
  922. the following (all on a single line in `inetd.conf') should be
  923. sufficient:
  924.  
  925.      2401  stream  tcp  nowait  root  /usr/local/bin/cvs
  926.      cvs -b /usr/local/bin pserver
  927.  
  928.    The `-b' option specifies the directory which contains the RCS
  929. binaries on the server.
  930.  
  931.    If your `inetd' wants a symbolic service name instead of a raw port
  932. number, then put this in `/etc/services':
  933.  
  934.      cvspserver      2401/tcp
  935.  
  936.    and put `cvspserver' instead of `2401' in `inetd.conf'.
  937.  
  938.    Once the above is taken care of, restart your `inetd', or do
  939. whatever is necessary to force it to reread its initialization files.
  940.  
  941.    Because the client stores and transmits passwords in cleartext
  942. (almost--see *Note Password authentication security:: for details), a
  943. separate CVS password file may be used, so people don't compromise their
  944. regular passwords when they access the repository.  This file is
  945. `$CVSROOT/CVSROOT/passwd' (*note Intro administrative files::.).  Its
  946. format is similar to `/etc/passwd', except that it only has two fields,
  947. username and password.  For example:
  948.  
  949.      bach:ULtgRLXo7NRxs
  950.      cwang:1sOp854gDF3DY
  951.  
  952.    The password is encrypted according to the standard Unix `crypt()'
  953. function, so it is possible to paste in passwords directly from regular
  954. Unix `passwd' files.
  955.  
  956.    When authenticating a password, the server first checks for the user
  957. in the CVS `passwd' file.  If it finds the user, it compares against
  958. that password.  If it does not find the user, or if the CVS `passwd'
  959. file does not exist, then the server tries the system's `/etc/passwd'
  960. file.  In either case, assuming the password is correct, the server
  961. switches to run as that user immediately after authentication, so that
  962. it will have no privileges which that user would not have.  Therefore
  963. it is necessary that usernames in the CVS `passwd' file be valid
  964. usernames on the system.
  965.  
  966.    Right now, the only way to put a password in the CVS `passwd' file
  967. is to paste it there from somewhere else.  Someday, there may be a `cvs
  968. passwd' command.
  969.  
  970. 
  971. File: cvs.info,  Node: Password authentication client,  Next: Password authentication security,  Prev: Password authentication server,  Up: Password authenticated
  972.  
  973. Using the client with password authentication
  974. .............................................
  975.  
  976.    Before connecting to the server, the client must "log in" with the
  977. command `cvs login'.  Logging in verifies a password with the server,
  978. and also records the password for later transactions with the server.
  979. The `cvs login' command needs to know the username, server hostname,
  980. and full repository path, and it gets this information from the
  981. repository argument or the `CVSROOT' environment variable.
  982.  
  983.    `cvs login' is interactive -- it prompts for a password:
  984.  
  985.      cvs -d bach@chainsaw.brickyard.com:/usr/local/cvsroot login
  986.      CVS password:
  987.  
  988.    The password is checked with the server; if it is correct, the
  989. `login' succeeds, else it fails, complaining that the password was
  990. incorrect.
  991.  
  992.    Once you have logged in, you can force CVS to connect directly to
  993. the server and authenticate with the stored password by prefixing the
  994. repository with `:pserver:':
  995.  
  996.      cvs -d :pserver:bach@chainsaw.brickyard.com:/usr/local/cvsroot checkout foo
  997.  
  998.    The `:pserver:' is necessary because without it, CVS will assume it
  999. should use `rsh' to connect with the server (*note Connecting via
  1000. rsh::.).  (Once you have a working copy checked out and are running CVS
  1001. commands from within it, there is no longer any need to specify the
  1002. repository explicitly, because CVS records it in the working copy's
  1003. `CVS' subdirectory.)
  1004.  
  1005.    Passwords are stored by default in the file `$HOME/.cvspass'.  Its
  1006. format is human-readable, but don't edit it unless you know what you
  1007. are doing.  The passwords are not stored in cleartext, but are
  1008. trivially encoded to protect them from "innocent" compromise (i.e.,
  1009. inadvertently being seen by a system administrator who happens to look
  1010. at that file).
  1011.  
  1012.    The `CVS_PASSFILE' environment variable overrides this default.  If
  1013. you use this variable, make sure you set it *before* `cvs login' is
  1014. run.  If you were to set it after running `cvs login', then later CVS
  1015. commands would be unable to look up the password for transmission to
  1016. the server.
  1017.  
  1018.    The `CVS_PASSWORD' environment variable overrides *all* stored
  1019. passwords.  If it is set, CVS will use it for all password-authenticated
  1020. connections.
  1021.  
  1022. 
  1023. File: cvs.info,  Node: Password authentication security,  Prev: Password authentication client,  Up: Password authenticated
  1024.  
  1025. Security considerations with password authentication
  1026. ....................................................
  1027.  
  1028.    The passwords are stored on the client side in a trivial encoding of
  1029. the cleartext, and transmitted in the same encoding.  The encoding is
  1030. done only to prevent inadvertent password compromises (i.e., a system
  1031. administrator accidentally looking at the file), and will not prevent
  1032. even a naive attacker from gaining the password.
  1033.  
  1034.    The separate CVS password file (*note Password authentication
  1035. server::.) allows people to use a different password for repository
  1036. access than for login access.  On the other hand, once a user has
  1037. access to the repository, she can execute programs on the server system
  1038. through a variety of means.  Thus, repository access implies fairly
  1039. broad system access as well.  It might be possible to modify CVS to
  1040. prevent that, but no one has done so as of this writing.  Furthermore,
  1041. there may be other security problems with CVS; it is not a simple
  1042. program and determining how people might use it to gain access to a
  1043. system is difficult.
  1044.  
  1045.    In summary, anyone who gets the password gets repository access, and
  1046. some measure of general system access as well.  The password is
  1047. available to anyone who can sniff network packets or read a protected
  1048. (i.e., user read-only) file.  If you want real security, get Kerberos.
  1049.  
  1050. 
  1051. File: cvs.info,  Node: Kerberos authenticated,  Prev: Password authenticated,  Up: Remote repositories
  1052.  
  1053. Direct connection with kerberos
  1054. -------------------------------
  1055.  
  1056.    The main disadvantage of using rsh is that all the data needs to
  1057. pass through additional programs, so it may be slower.  So if you have
  1058. kerberos installed you can connect via a direct TCP connection,
  1059. authenticating with kerberos (note that the data transmitted is *not*
  1060. encrypted).
  1061.  
  1062.    To do this, CVS needs to be compiled with kerberos support; when
  1063. configuring CVS it tries to detect whether kerberos is present or you
  1064. can use the `--with-krb4' flag to configure.
  1065.  
  1066.    You need to edit `inetd.conf' on the server machine to run `cvs
  1067. kserver'.  The client uses port 1999 by default; if you want to use
  1068. another port specify it in the `CVS_CLIENT_PORT' environment variable
  1069. on the client.  Set `CVS_CLIENT_PORT' to `-1' to force an rsh
  1070. connection.
  1071.  
  1072.    When you want to use CVS, get a ticket in the usual way (generally
  1073. `kinit'); it must be a ticket which allows you to log into the server
  1074. machine.  Then you are ready to go:
  1075.  
  1076.      cvs -d chainsaw.brickyard.com:/user/local/cvsroot checkout foo
  1077.  
  1078.    If CVS fails to connect, it will fall back to trying rsh.
  1079.  
  1080. 
  1081. File: cvs.info,  Node: Starting a new project,  Next: Multiple developers,  Prev: Repository,  Up: Top
  1082.  
  1083. Starting a project with CVS
  1084. ***************************
  1085.  
  1086.    Since CVS 1.x is bad at renaming files and moving them between
  1087. directories, the first thing you do when you start a new project should
  1088. be to think through your file organization.  It is not impossible--just
  1089. awkward--to rename or move files.  *Note Moving files::.
  1090.  
  1091.    What to do next depends on the situation at hand.
  1092.  
  1093. * Menu:
  1094.  
  1095. * Setting up the files::        Getting the files into the repository
  1096. * Defining the module::         How to make a module of the files
  1097.  
  1098. 
  1099. File: cvs.info,  Node: Setting up the files,  Next: Defining the module,  Up: Starting a new project
  1100.  
  1101. Setting up the files
  1102. ====================
  1103.  
  1104.    The first step is to create the files inside the repository.  This
  1105. can be done in a couple of different ways.
  1106.  
  1107. * Menu:
  1108.  
  1109. * From files::                  This method is useful with old projects
  1110.                                 where files already exists.
  1111.  
  1112. * From scratch::                Creating a module from scratch.
  1113.  
  1114. 
  1115. File: cvs.info,  Node: From files,  Next: From scratch,  Up: Setting up the files
  1116.  
  1117. Creating a module from a number of files
  1118. ----------------------------------------
  1119.  
  1120.    When you begin using CVS, you will probably already have several
  1121. projects that can be put under CVS control.  In these cases the easiest
  1122. way is to use the `import' command.  An example is probably the easiest
  1123. way to explain how to use it.  If the files you want to install in CVS
  1124. reside in `DIR', and you want them to appear in the repository as
  1125. `$CVSROOT/yoyodyne/DIR', you can do this:
  1126.  
  1127.      $ cd DIR
  1128.      $ cvs import -m "Imported sources" yoyodyne/DIR yoyo start
  1129.  
  1130.    Unless you supply a log message with the `-m' flag, CVS starts an
  1131. editor and prompts for a message.  The string `yoyo' is a "vendor tag",
  1132. and `start' is a "release tag".  They may fill no purpose in this
  1133. context, but since CVS requires them they must be present.  *Note
  1134. Tracking sources::, for more information about them.
  1135.  
  1136.    You can now verify that it worked, and remove your original source
  1137. directory.
  1138.  
  1139.      $ cd ..
  1140.      $ mv DIR DIR.orig
  1141.      $ cvs checkout yoyodyne/DIR       # Explanation below
  1142.      $ ls -R yoyodyne
  1143.      $ rm -r DIR.orig
  1144.  
  1145. Erasing the original sources is a good idea, to make sure that you do
  1146. not accidentally edit them in DIR, bypassing CVS.  Of course, it would
  1147. be wise to make sure that you have a backup of the sources before you
  1148. remove them.
  1149.  
  1150.    The `checkout' command can either take a module name as argument (as
  1151. it has done in all previous examples) or a path name relative to
  1152. `$CVSROOT', as it did in the example above.
  1153.  
  1154.    It is a good idea to check that the permissions CVS sets on the
  1155. directories inside `$CVSROOT' are reasonable, and that they belong to
  1156. the proper groups.  *Note File permissions::.
  1157.  
  1158. 
  1159. File: cvs.info,  Node: From scratch,  Prev: From files,  Up: Setting up the files
  1160.  
  1161. Creating a module from scratch
  1162. ------------------------------
  1163.  
  1164.    For a new project, the easiest thing to do is probably to create an
  1165. empty directory structure, like this:
  1166.  
  1167.      $ mkdir tc
  1168.      $ mkdir tc/man
  1169.      $ mkdir tc/testing
  1170.  
  1171.    After that, you use the `import' command to create the corresponding
  1172. (empty) directory structure inside the repository:
  1173.  
  1174.      $ cd tc
  1175.      $ cvs import -m "Created directory structure" yoyodyne/DIR yoyo start
  1176.  
  1177.    Then, use `add' to add files (and new directories) as they appear.
  1178.  
  1179.    Check that the permissions CVS sets on the directories inside
  1180. `$CVSROOT' are reasonable.
  1181.  
  1182. 
  1183. File: cvs.info,  Node: Defining the module,  Prev: Setting up the files,  Up: Starting a new project
  1184.  
  1185. Defining the module
  1186. ===================
  1187.  
  1188.    The next step is to define the module in the `modules' file.  This
  1189. is not strictly necessary, but modules can be convenient in grouping
  1190. together related files and directories.
  1191.  
  1192.    In simple cases these steps are sufficient to define a module.
  1193.  
  1194.   1. Get a working copy of the modules file.
  1195.  
  1196.           $ cvs checkout modules
  1197.           $ cd modules
  1198.  
  1199.   2. Edit the file and insert a line that defines the module.  *Note
  1200.      Intro administrative files::, for an introduction.  *Note
  1201.      modules::, for a full description of the modules file.  You can
  1202.      use the following line to define the module `tc':
  1203.  
  1204.           tc   yoyodyne/tc
  1205.  
  1206.   3. Commit your changes to the modules file.
  1207.  
  1208.           $ cvs commit -m "Added the tc module." modules
  1209.  
  1210.   4. Release the modules module.
  1211.  
  1212.           $ cd ..
  1213.           $ cvs release -d modules
  1214.  
  1215. 
  1216. File: cvs.info,  Node: Multiple developers,  Next: Branches,  Prev: Starting a new project,  Up: Top
  1217.  
  1218. Multiple developers
  1219. *******************
  1220.  
  1221.    When more than one person works on a software project things often
  1222. get complicated.  Often, two people try to edit the same file
  1223. simultaneously.  Some other version control systems (including RCS and
  1224. SCCS) try to solve that particular problem by introducing "file
  1225. locking", so that only one person can edit each file at a time.
  1226. Unfortunately, file locking can be very counter-productive.  If two
  1227. persons want to edit different parts of a file, there may be no reason
  1228. to prevent either of them from doing so.
  1229.  
  1230.    CVS does not use file locking.  Instead, it allows many people to
  1231. edit their own "working copy" of a file simultaneously.  The first
  1232. person that commits his changes has no automatic way of knowing that
  1233. another has started to edit it.  Others will get an error message when
  1234. they try to commit the file.  They must then use CVS commands to bring
  1235. their working copy up to date with the repository revision.  This
  1236. process is almost automatic, and explained in this chapter.
  1237.  
  1238.    There are many ways to organize a team of developers.  CVS does not
  1239. try to enforce a certain organization.  It is a tool that can be used
  1240. in several ways.  It is often useful to inform the group of commits you
  1241. have done.  CVS has several ways of automating that process.  *Note
  1242. Informing others::.  *Note Revision management::, for more tips on how
  1243. to use CVS.
  1244.  
  1245. * Menu:
  1246.  
  1247. * File status::                 A file can be in several states
  1248. * Updating a file::             Bringing a file up-to-date
  1249. * Conflicts example::           An informative example
  1250. * Informing others::            To cooperate you must inform
  1251. * Concurrency::                 Simultaneous repository access
  1252. * Watches::                     Mechanisms to track who is editing files
  1253.  
  1254. 
  1255. File: cvs.info,  Node: File status,  Next: Updating a file,  Up: Multiple developers
  1256.  
  1257. File status
  1258. ===========
  1259.  
  1260.    After you have checked out a file out from CVS, it is in one of
  1261. these four states:
  1262.  
  1263. Up-to-date
  1264.      The file is identical with the latest revision in the repository.
  1265.  
  1266. Locally modified
  1267.      You have edited the file, and not yet committed your changes.
  1268.  
  1269. Needing update
  1270.      Someone else has committed a newer revision to the repository.
  1271.  
  1272. Needing merge
  1273.      Someone else have committed a newer revision to the repository,
  1274.      and you have also made modifications to the file.
  1275.  
  1276.    You can use the `status' command to find out the status of a given
  1277. file.  *Note status::.
  1278.  
  1279.